# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=py3-injector
pkgver=0.18.3
pkgrel=1
pkgdesc="Python dependency injection framework, inspired by Guice"
url="https://github.com/alecthomas/injector"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-typing-extensions"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
options="!check" # Tests apparently aren't in pypi tarballs?
source="https://files.pythonhosted.org/packages/source/i/injector/injector-$pkgver.tar.gz"
builddir="$srcdir/injector-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="109473abd0f4ee693c168a024d241464239bff35d950d5001f2b160d6b28e24eb6254c809fde1179a5106f6e523acbe3eabc286533dd7998d0e75f6f0dc6fb4e  injector-0.18.3.tar.gz"
